/**
 * Copyright (c) 2012-2013 Nokia Corporation. All rights reserved.
 * Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation. 
 * Oracle and Java are trademarks or registered trademarks of Oracle and/or its
 * affiliates. Other product and company names mentioned herein may be trademarks
 * or trade names of their respective owners. 
 * See LICENSE.TXT for license information.
 */
package com.nokia.example.fuelcalculator.utils;

import com.nokia.example.fuelcalculator.l10n.L10NIDs;
import com.nokia.example.fuelcalculator.l10n.Localizer;
import javax.microedition.lcdui.Command;

/**
 * A public store for commonly used Commands, to allow different parts of the
 * MIDlets talk the same language
 */
public final class Commands {

    public static final Command GOTO_ADD_FILLING_VIEW;
    public static final Command BACK_FROM_ADD_FILLING;
    public static final Command GOTO_HELP_VIEW;
    public static final Command GOTO_ABOUT_VIEW;
    public static final Command BACK_FROM_ABOUT_OR_HELP;
    public static final Command SAVE_FILLING_ACTION;
    public static final Command CLEAR_FIELDS_ACTION;
    public static final Command DELETE_LATEST_CONSUMPTION_ACTION;
    public static final Command OK_FROM_ALERT;
    public static final Command BACK_FROM_ALERT;
    public static final Command EXIT;

    static {
        Localizer localizer = Localizer.getInstance();
        
        GOTO_ADD_FILLING_VIEW = new Command(
                localizer.getString(L10NIDs.COMMAND_ADD_FILLING),
                Command.OK,
                1);
        BACK_FROM_ADD_FILLING = new Command(
                localizer.getString(L10NIDs.COMMAND_BACK),
                Command.BACK,
                1);
        GOTO_HELP_VIEW = new Command(
                localizer.getString(L10NIDs.COMMAND_HELP),
                Command.OK,
                3);
        GOTO_ABOUT_VIEW = new Command(
                localizer.getString(L10NIDs.COMMAND_ABOUT),
                Command.OK,
                4);
        BACK_FROM_ABOUT_OR_HELP = new Command(
                localizer.getString(L10NIDs.COMMAND_BACK),
                Command.BACK,
                1);
        SAVE_FILLING_ACTION = new Command(
                localizer.getString(L10NIDs.COMMAND_SAVE),
                Command.OK,
                1);
        CLEAR_FIELDS_ACTION = new Command(
                localizer.getString(L10NIDs.COMMAND_CLEAR_FIELDS),
                Command.OK,
                2);
        DELETE_LATEST_CONSUMPTION_ACTION = new Command(
                localizer.getString(L10NIDs.COMMAND_DELETE_LATEST_CONSUMPTION),
                Command.OK,
                2);
        OK_FROM_ALERT = new Command(
                localizer.getString(L10NIDs.COMMAND_OK),
                Command.OK,
                1);
        BACK_FROM_ALERT = new Command(
                localizer.getString(L10NIDs.COMMAND_BACK),
                Command.BACK,
                1);
        EXIT = new Command(
                localizer.getString(L10NIDs.COMMAND_EXIT),
                Command.EXIT,
                1);
    }
}
